<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:py="http://genshi.edgewall.org/">
  <xi:include href="layout.html" />
  <head>
    <title>Katalog</title>
    <script type="text/javascript" src="/yui/yahoo-dom-event/yahoo-dom-event.js"></script> 
    <script type="text/javascript" src="/yui/connection/connection-min.js"></script>  
    <script type="text/javascript" src="/yui/autocomplete/autocomplete-debug.js"></script> 
    <script type="text/javascript" src="/yui/datasource/datasource-beta-debug.js"></script> 
<!--     <script type="text/javascript" src="/yui/element/element-beta-debug.js"></script>  -->
<!--     <script type="text/javascript" src="/yui/dom/dom-min.js"></script> -->
<!--     <script type="text/javascript" src="/yui/event/event-debug.js"></script> -->
    <script type="text/javascript" src="/yui/calendar/calendar-min.js"></script>
    <script type="text/javascript" src="/media/json.js"></script> 
    <link rel="stylesheet" type="text/css" href="/yui/autocomplete/autocomplete.css"/>
    <link type="text/css" rel="stylesheet" href="/yui/calendar/calendar.css"/>
    <style type="text/css">
        /* custom styles for multiple stacked instances */
        #statesautocomplete,
        #statesautocomplete2 {
            width:15em; /* set width here */
            padding-bottom:2em;
        }
        #statesautocomplete {
            z-index:9000; /* z-index needed on top instance for ie + sf absolute inside relative issue */
        }
        #statesinput,
        #statesinput2 {
            _position:absolute; /* abs pos needed for ie quirks */
        }
    </style>
  </head>
  <body class="yui-skin-sam">

    <form onsubmit="return false" id="formClientSide" style="display:none">
        <div id="clientSide">
            <label>Søk etter organisasjon: 
                <input type="text" id="myInput"/>
            </label>
            <div id="myContainer"></div>
        </div>
    </form>

    <div id="cal1Container"></div>
    <div id="serverSide">
        <div id="smuler">
            <a py:if="orgtype" href="?" class="smule">type: ${orgtype} ></a>
            <a py:if="organisasjon" href="?orgtype=${orgtype}" class="smule">${organisasjon.navn}</a>
        </div>
        <div id="tre">
            <py:if test="orgtyper">
                <ul py:for="type in orgtyper" id="orgTypeListe">
                    <li id="type-${type}"><a href="?orgtype=${type}">${type}</a></li>
                </ul>
            </py:if>
        
            <py:if test="organisasjoner">
                <ul py:for="org in organisasjoner" id="organisasjonListe">
                    <li id="org-${org.id}"><a href="?orgtype=${orgtype}&amp;org=${org.id}">${org.navn}</a></li>
                </ul>
            </py:if>
            
            <py:if test="organisasjon">
                <ul id="organisasjonValg">
                  <li><a href="?orgtype=${orgtype}&amp;org=${organisasjon.id}&amp;orgvalg=avdelinger">avdelinger</a></li>
                  <li><a href="?orgtype=${orgtype}&amp;org=${organisasjon.id}&amp;orgvalg=saksbehandlere">saksbehandlere</a></li>
                  <li><a href="?orgtype=${orgtype}&amp;org=${organisasjon.id}&amp;orgvalg=postjournaler">postjournaler</a></li>
                </ul>
            </py:if>
        </div>
        <div id="vis"></div>
    </div>
    <script type="text/javascript" src="/media/katalog.js"></script>
    <script py:if="log" type="text/javascript" src="/media/log.js"></script>
  </body>
</html>
